import cv2

# #读图
# img = cv2.imread('./code.png',cv2.IMREAD_GRAYSCALE)

# print(img)

# #写图
# cv2.imwrite('./code1.png',img)



from PIL import Image,ImageDraw,ImageFont

#读图
# im = Image.open('./37.png')

# print(im.format,im.size,im.mode)

# font = ImageFont.truetype(r'‪C:\Windows\Fonts\simkai.ttf',150)

# #生成画笔
# draw = ImageDraw.Draw(im)
# # 
# # #绘制  参数分别为坐标，文字，透明色
# draw.text((1500,1100),'周磊',fill=(76,234,124,180),font=font)

# im.show()



import time

t = time.time()
print(int(t))
print(type(t))



#图像压缩
#png
# img = cv2.imread('../static/upload/04.jpg')
# print(img)
# #压缩 压缩等级 0-9
# cv2.imwrite('./37xin.png',img,[cv2.IMWRITE_PNG_COMPRESSION,9])

# #jpg 压缩等级 0-100
# cv2.imwrite('./37xinxin.jpg',img,[cv2.IMWRITE_JPEG_QUALITY,50])